Skip to content

fix(test-springboot): wait for compose services to be healthy before testing#49

Merged
taorepoara merged 1 commit into
mainfrom
fix/wait-for-compose-healthy
Jul 15, 2026
Merged

fix(test-springboot): wait for compose services to be healthy before testing#49
taorepoara merged 1 commit into
mainfrom
fix/wait-for-compose-healthy

Conversation

@taorepoara

Copy link
Copy Markdown
Member

Summary

  • docker compose up -d returns as soon as containers start, not once they're actually ready to accept connections.
  • For consumers of compose-file/compose-profile inputs with a healthcheck defined (e.g. Postgres via pg_isready), this let the test step run before the service was actually ready, causing persistent connection-refused failures in downstream test suites.
  • Add --wait to the docker compose up -d invocation so the step blocks until all started services report healthy.

Context

Found while investigating a persistently failing "Test Spring Boot App" check on lenra-io/Ximiti#47: a new test suite connecting directly to Postgres kept failing with ConnectException for the entire retry window, even after retries up to 180s, while the Postgres container had already reported "Started". Postgres's pg_isready healthcheck in compose.yml was already defined but never actually waited on.

Test plan

  • Re-run the "Test Spring Boot App" check on lenra-io/Ximiti#47 once this merges to main (it references @main) and confirm it passes.

Generated by Claude Code

…testing

docker compose up -d returns as soon as containers start, not once
they're actually ready. For Postgres (and any other compose-file
consumer with a healthcheck), that let the test step run before the
DB was accepting connections, causing persistent connection-refused
failures. Add --wait so the step blocks until compose reports the
started services as healthy.
@taorepoara
taorepoara merged commit 31a68fa into main Jul 15, 2026
1 check failed
@taorepoara
taorepoara deleted the fix/wait-for-compose-healthy branch July 15, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants